import logging

from . import ROOT_DIR

logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s - %(levelname)s - %(message)s",  # 设置日志格式
    datefmt="%Y-%m-%d %H:%M:%S",  # 设置日期格式
    handlers=[
        logging.StreamHandler(),  # 将日志输出到控制台
        logging.FileHandler((ROOT_DIR.parent / "log" / "app.log").as_posix()),
    ],
)

logging.info("日志初始化完成...")
